# 指定内核源码根路径
KERNEL_DIR = /home/robin/work/kernel-rockchip-nanopi4-linux-v4.4.y 

# 当前路径
CUR_DIR = $(shell pwd)

all:
	make -C  $(KERNEL_DIR) M=$(CUR_DIR) modules

clean:
	make -C  $(KERNEL_DIR) M=$(CUR_DIR) clean 
	

install:
	scp *.ko  root@192.168.0.154:/drv_code

# 指定当前目录下那些文件作为内核模块编译链接
obj-m = hello_drv.o
